﻿@model Common.Views.OrdersView

<table>
    <tr>
        <th>Features</th>
        <th>Quantity</th>
        <th>Date Purchased</th>
        <th>Warranty Expiry Date</th>
        <th>Status of the fault</th>
    </tr>

    <tr>
        <td>
            @Html.DisplayFor(modelItem => Model.Features)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.Quantity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.OrderDate)
        </td>
        <td>
            @if (Model.WarrantyExpiryDate > DateTime.Now)
            {
                @Html.DisplayFor(modelItem => Model.WarrantyExpiryDate)
            }
            else
            {
                <div style="color:Red">
                    @Html.Label("Warranty has expired!")
                </div>
            }
        </td>
        <td>
            @if (Model.FaultStatus != null)
            {
                @Html.DisplayFor(modelItem => Model.FaultStatus)
            }
            else
            {
                @Html.Label("N/A");
            }
        </td>
    </tr>
</table>